<?php

//测试
if(isset($_SERVER['HTTP_HOST']) && preg_match('/local/',$_SERVER['HTTP_HOST'])){
    return [
        'class' => 'yii\db\Connection',
        'dsn' => 'mysql:host=127.0.0.1;dbname=analysis;port=3306',
        'username' => 'root',
        'password' => 'DRsXT5ZJ6Oi55LPQ',
        'charset' => 'utf8',
    ];
}
//线上
return [
    'class' => 'yii\db\Connection',
    'dsn' => 'mysql:host=47.88.18.245;dbname=analysis;port=3306;charset=utf8mb4',
    'username' => 'analysis',
    'password' => 'PStM852jCYmJECwK',
    'charset' => 'utf8',
];